const userModel = require('../models/user.js')

exports.list = (req, res, next) => {

}

exports.create = async (req, res, next) => {
	const body = req.body
	try {
		const id = await userModel.createdUser(body)
		const user = await userModel.getUserByCondition('id', id)
		res.status(201).json(user)
	} catch(err) {
		next(err)
	}
	
}

exports.update = (req, res, next) => {

}

exports.destroy = (req, res, next) => {

}
